Book Contents

About array tags

Array tags are used with alarms. Rather than using a tag for each alarm trigger, you can create an array tag with a specific number of elements and connect an alarm trigger to each element. This frees up more tags for other uses.

Use bit arrays with bit or LSBit trigger types to trigger alarm messages. By assigning alarm triggers to the elements in a bit array instead of to bit addresses, you leave more tags in the database free for other uses. When an element of an array changes from 0 to 1, it can generate an alarm message if a message has been set up for that bit position. With the Bit trigger type, you can generate simultaneous alarm messages, one for each element. With the LSB trigger type, only the lowest bit position would trigger an alarm.

The number of bits in the array depends on the data type of the tag. Integer data types, for example, return 16 bits per element, while Bit data types return 8 bit per element.

To trigger a digital alarm based on an array of controller bits, you must use a direct reference and the syntax tagname,Larraylength (for example, [PLC5]N7:0,L5.

Tip:

Do not leave a space between the tag address and the length.

For example, the address {[SLC]BlockWrite1, L8} (where BlockWrite is the equivalent of N7:0), will not work. {[SLC]BlockWrite1,L8} will work.

To trigger alarms using bit positions

  1. In the Trigger tab of the Alarm Setup editor, create a Bit type alarm trigger.
  2. In the Trigger dialog box, click Browse in the Tag column and browse to the first element of an array. (Example: in a Logix 5000 controller called CLGX1, select AAlm[0]. This is an integer tag type.)
  3. Click OK to insert the tag address into your trigger tag. This address {[CLGX1]AAlm[0]} will be the starting element in your array tag. [CLGX1] is the direct reference, that is, the FactoryTalk Linx device shortcut name.
  4. Double-click the address and append a comma and the letter L to the address. Then type the number of elements you want to include in your array tag. To add 64 elements to the example address, modify it to read {[CLGX1]AAlm[0],L64]}. This syntax will return (64 x 16 =) 1024 bits. Do not leave a space between the tag address and the length.
  5. In the Messages tab, assign trigger values and alarm messages to as many of the elements in the array tag as you like. Each trigger value corresponds to a bit position, not a bit address.

    In the Trigger Value column, enter a number for the element that will trigger the message, and create the message in the Message column. When that element in the array changes value, it will trigger the alarm and display the message.

    Bit position

    Trigger Value

    Message

    1

    1

    Line 1: Conveyor has stopped

    2

    2

    Line 1: Power failure

    3

    3

    Line 2: Conveyor has stopped

    4

    4

    Line 2: Power failure

    ..

    ..

    ..

    1024

    1024

    Line 6: Oven door open

To trigger alarms using Least Significant Bit positions

  1. In the Trigger tab of the Alarm Setup editor, create an LSBit type alarm trigger.
  2. In the Trigger dialog box, click Browse in the Tag column and browse to the first element of an array.(For example, in a PLC5, select an integer tag N7:61. For this example, only the first three bit positions are used, so there is no need to specify a length (L) for the array. If you were monitoring bits in N7:62 as well, you would add L2 to the address: ::[PLC5]N7:61,L2
  3. Specify these trigger values and alarm messages for the alarm trigger:

    Bit in the array

    Bit position

    Trigger value

    Message

    00

    1

    1

    Motor has lost power

    01

    2

    2

    Motor has stopped

    02

    3

    3

    Overload switch has lost power

    At run time, if power to the motor is lost, all three bit values will change from 0 to 1, but only the first alarm message will be generated, because bit 00 is the least significant, that is, the lowest, bit. If the operator acknowledges the first alarm and power is not yet restored, the second alarm is generated, and so on.

See also

Set up alarm triggers (Trigger tab)

About HMI tag types

Keywords: array tag